import java.awt.Color;
import java.awt.Graphics;

public class Player
{
	
	int x, y;
	
	public Player(int startX, int startY)
	{
		this.x = startX;
		this.y = startY;
	}
	
	public void render(Graphics g)
	{
		g.setColor(Color.BLACK);
		g.fillRect(x, y, 10, 70);
		//g.fillOval(x, y, 50, 50);
	}
	
	public void movePlayer(int xChange, int yChange)
	{
		if(x + xChange < 0 || x + xChange > GamePanel.X_SIZE || (x + xChange) + 9 < 0 || (x + xChange) + 9 > GamePanel.X_SIZE)
		{
			xChange = 0;
		}else if(y + yChange < 0 || y + yChange > GamePanel.Y_SIZE || (y + yChange) + 69 < 0 || (y + yChange) + 69 > GamePanel.Y_SIZE)
		{
			yChange = 0;
		}
		
		x += xChange;
		y += yChange;
	}
	
	public int getX()
	{
		return this.x;
	}
	
	public int getY()
	{
		return this.y;
	}
}